/**
 * 上传文件接口
 */
import { uploadFile } from '@/apiList/api_file'
import { fileServerPath } from '@/config/app'
export async function uploadFileApi(blobInfo) {
  const formData = new FormData()
  formData.append('file', blobInfo.blob(), blobInfo.filename())
  let res = await uploadFile(formData)
  let fid = res.fileInfos[0].fid
  let imgUrl = getAllImgPath(fid)
  return imgUrl
}
function getAllImgPath(fid) {
  return `${fileServerPath}/oss/downloadFile?fid=${fid}`
}
